<!DOCTYPE html>
<html>
   <head>
      <title>中骏森驰课题管理</title>
      <meta name="viewport" content="width=device-width, initial-scale=1.0 Access-Control-Allow-Origin">
      <!-- 引入 Bootstrap -->
      <!--<link href="<?=base_url('html/bootstrap_v3/css/bootstrap.css')?>" rel="stylesheet">-->
      <link href="<?=  base_url('/html/bootstrap_v3/css/bootstrap.css')?>" rel="stylesheet">
      <link href="<?=base_url('html/bootstrap_v3/datepicker/css/bootstrap-datetimepicker.min.css')?>" rel="stylesheet">
      <style>
          .table{margin-bottom: 0px}
      </style>
      <script src="<?=base_url('html/js/jquery-1.8.3.min.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/js/bootstrap.min.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/datepicker/js/bootstrap-datetimepicker.js')?>"></script>
      <script src="<?=base_url('html/bootstrap_v3/datepicker/js/locales/bootstrap-datetimepicker.zh-CN.js')?>"></script>
      <script>
      $('.goDate').datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
      });
      </script>
      
      <!-- HTML5 Shim 和 Respond.js 用于让 IE8 支持 HTML5元素和媒体查询 -->
      <!-- 注意： 如果通过 file://  引入 Respond.js 文件，则该文件无法起效果 -->
      <!--[if lt IE 9]>
         <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
         <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
      <![endif]-->
   </head>
   <body>
      <div class="container">
      <form action="" class="form-horizontal" role="form">
          </br>
        <fieldset>
          <legend class="text-center" style="font-weight:bold;font-size:2em;margin-top: 10px;">
            中骏森驰课题管理
          </legend>
            <div class="panel-group" id="accordion">
                <?php foreach ($data as $value):?>
                <div class="panel panel-default">
                  <div class="panel-heading">
                    <h4 class="panel-title">
                      <a data-toggle="collapse" data-parent="#accordion" 
                         href="#<?=$value['ID']?>">
                        <?=$value['PROJECTNAME']?>
                      </a>
                    </h4>
                  </div>
                  <div id="<?=$value['ID']?>" class="panel-collapse collapse">
                    <div class="panel-body">
                        <table class="table  table-bordered">
                            <thead>
                                <tr>
                                   <th>课题名称</th>
                                   <th>预计收益(月/W)</th>
                                   <th>责任人</th>
                                </tr>
                             </thead>
                            <?php foreach ($value['content'] as $v):?>
                                <tbody>
                                    <tr class="<?php if($v['STATUS']%4==0){echo 'active';}elseif($v['STATUS']%4==1){echo 'success';}elseif($v['STATUS']%4==2){echo 'danger';}elseif($v['STATUS']%4==3){echo 'warning';}?>">
                                        <td> 
                                            <p><?=$v['TITLE']?><button type="button" class="btn btn-primary btn-sm pull-right" onclick="procontent(<?=$v['ID']?>)">进度跟踪</button></p>
                                        </td>
                                        <td><?=$v['INCOME']?></td>
                                        <td><?=$v['CREATER']?></td>
                                    </tr>
                                </tbody>
                            <?php endforeach; ?>
                        </table>
                    </div>
                  </div>
                </div>
                <?php endforeach; ?>
            </div>
    </fieldset>
    </form>
    </div>
    <script type="text/javascript">
      $('.goDate').datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
      });
      /*
      $('.backDate').datetimepicker({
        language: 'zh-CN',
        weekStart: 1,
        todayBtn: 1,
        autoclose: 1,
        todayHighlight: 1,
        startView: 2,
        forceParse: 0,
        showMeridian: 1
      });
      */
     function procontent(id){
         window.location.href = "<?=  base_url('ProjectManage/ProjectProcess')?>" + "?id="+id+"&username=<?=$username?>";
     }
     function showsales(thisid){
         $("#"+thisid).click();
     }
    </script>
   </body>
</html>